import request from "@/utils/request";
import ConstTable from './ConstTable'


const api = {
    // 根据ID获取打印事件与打印配置关联
    getInfo(id)
    {
        return request({
            url: `${ConstTable.BaseUrl}/BaseData/ComBaseEvent/${id}`,
            method: "get"
        });
    },
    // 查询打印事件与打印配置关联
    getList(query)
    {
        return request({
            url: `${ConstTable.BaseUrl}/BaseData/ComBaseEvent`,
            method: "GET",
            data: query
        });
    },
    // 创建
    create(dataForm)
    {
        return request({
            url: `${ConstTable.BaseUrl}/BaseData/ComBaseEvent`,
            method: "post",
            data: dataForm
        });
    },
    // 更新
    update(dataForm)
    {
        return request({
            url: `${ConstTable.BaseUrl}/BaseData/ComBaseEvent/${dataForm.id}`,
            method: "PUT",
            data: dataForm
        });
    },
    // 删除
    delete(id)
    {
        return request({
            url: `${ConstTable.BaseUrl}/BaseData/ComBaseEvent/${id}`,
            method: "DELETE"
        });
    },
};

export default api;

export const getDefactAll = api.getAll;
